﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace DispatchAssist.BusinessLogical.Model
{
    /// <summary>
    /// SeatLogin
    /// </summary>
    public class QuerySeatLogin
    {

        /// <summary>
        /// SeatLogin 构造函数
        /// </summary>
        public QuerySeatLogin()
        { }


        /// <summary>
        /// SeatLogin OR映射构造函数
        /// </summary>
        public QuerySeatLogin(System.Data.IDataReader dr)
        {
            this.LoginID = (Guid)dr["LoginID"];
            this.SeatID = (Guid)dr["SeatID"];
            this.UserID = (Guid)dr["UserID"];
            this.LoginDate = Convert.ToDateTime(dr["LoginDate"]);
            this.IsLogout = Convert.ToBoolean(dr["IsLogout"]);

            this.UserName = Convert.ToString(dr["UserName"]);
            this.SeatName = Convert.ToString(dr["SeatName"]);
            this.DeleteFlag = Convert.ToBoolean(dr["DeleteFlag"]);
        }


        /// <summary>
        /// 
        /// </summary>
        public Guid LoginID { get; set; }

        /// <summary>
        /// 席位ID
        /// </summary>
        public Guid SeatID { get; set; }

        /// <summary>
        /// 用户ID
        /// </summary>
        public Guid UserID { get; set; }

        /// <summary>
        /// 登陆时间
        /// </summary>
        public DateTime LoginDate { get; set; }

        /// <summary>
        /// 是否已登出
        /// </summary>
        public bool IsLogout { get; set; }

        public string UserName { get; set; }

        public string SeatName { get; set; }
        /// <summary>
        /// 逻辑删除标记
        /// </summary>
        public bool DeleteFlag { get; set; }
        public override string ToString()
        {
            return string.Format("[SeatID：{0},UserID:{1}]", this.SeatID, this.UserID);
        }

    }
}
